<template>
  <view class="viewport">
    <fui-nav-bar title=""></fui-nav-bar>
    <view class="warp">
      <view class="title">设备管理</view>
      <view class="img_box">
        <image class="nav_img" src="/static/logo.png" mode=""></image>
      </view>
      <view class="port_box">
        <view class="account">
          <view class="account_title">登录账号</view>
          <fui-input
            :inputBorder="false"
            :padding="['20rpx', '5rpx']"
            class="input"
            :bottomLeft="0"
            placeholder="请输入登录账号"
            backgroundColor="transparency"
            maxlength="16"
          ></fui-input>
        </view>
        <view class="account">
          <view class="account_title">登录密码</view>
          <fui-input
            :inputBorder="false"
            :padding="['20rpx', '5rpx']"
            class="input"
            :bottomLeft="0"
            placeholder="请输入登录密码"
            backgroundColor="transparency"
            maxlength="16"
            :password="password"
          >
            <fui-icon :name="password ? 'invisible' : 'visible'" color="#B2B2B2" :size="50" @click="change"></fui-icon>
          </fui-input>
        </view>
      </view>

      <view class="loginBtn">登录</view>
    </view>
  </view>
</template>

<script setup>
import { ref } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
const TopsafeAreaInsets = ref({});
const password = ref(true);

onShow(() => {});

const change = () => {
  password.value = !password.value;
};
</script>

<style lang="scss" scoped>
page {
  height: 100%;
  overflow: hidden;
}
.viewport {
  height: 100%;

  .title {
    text-align: center;
    font-size: 60rpx;
    margin: 30rpx 0;
    color: #0052d9;
    font-weight: 600;
  }
  .img_box {
    display: flex;
    justify-content: space-around;
    margin: 30rpx 0;
  }
  .nav_img {
    width: 500rpx;
    height: 450rpx;
  }
}

.port_box {
  width: 100%;
  padding: 30rpx;
  .account {
    .account_title {
      font-size: 30rpx;
      margin-bottom: 20rpx;
    }
    .input {
      height: 70rpx;
      margin-bottom: 15rpx;
    }
  }
}
.loginBtn {
  background-color: #0052d9;
  width: 70%;
  margin: 30rpx auto;
  height: 70rpx;
  color: #fff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-radius: 10rpx;
}
</style>
